package com.zc.datastructure.structure.tree;

import com.zc.datastructure.structure.AbstractNodeData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author: zhuCan
 * @date: 2019-08-06 15:49
 * @description:
 */
@ToString
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeData extends AbstractNodeData<TreeData> {

  /**
   * 序列 用来排序的
   */
  private Integer index;

  /**
   * 数据
   */
  private String msg;


  @Override
  public int compareTo(TreeData o) {
    return index - o.index;
  }
}
